package com.lxy.service.impl;

import com.lxy.bean.User;
import com.lxy.dao.UserMapper;
import com.lxy.generic.GenericDao;
import com.lxy.generic.GenericServiceImpl;
import com.lxy.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("userService")
public class UserServiceImpl extends GenericServiceImpl<User, Integer> implements UserService {
	@Resource
	private UserMapper userMapper;
	
	@Override
	public User getUserByUserName(String userName) {
		return userMapper.getUserByUserName(userName);
	}

	@Override
	public GenericDao<User, Integer> getDao() {
		return userMapper;
	}

	@Override
	public List<User> getUsers() {
		return userMapper.getAll();
	}
}
